package com.study.service;

import com.study.dao.BusReceiverDao;
import com.study.entity.BusReceiverEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

@Service
public class BusReceiverServiceImpl implements BusReceiverService {
    @Autowired
    BusReceiverDao busReceiverDao;

    @Override
    public BusReceiverEntity findByName(String name) {
        return busReceiverDao.findByName(name);
    }

    @Override
    public List<BusReceiverEntity> findAll() {
        return busReceiverDao.findAll();
    }

    @Override
    public List<BusReceiverEntity> findByNameMatch(String name) {
        return busReceiverDao.findByNameMatch(name);
    }

    @Override
    public Optional<BusReceiverEntity> findById(Long id) {
        return busReceiverDao.findById(id);
    }
}
